﻿using System;

namespace TallComponents.Web.Pdf.Services
{
   /// <summary>
   /// Interface for logging service.
   /// </summary>
   /// <remarks>This interface was designed to be compatible to be with commonly used
   /// logging solutions such as Log4Net, Nlog etc.
   /// </remarks>
   internal interface ILog
   {
      /// <summary>
      /// Logs an informational message.
      /// </summary>
      /// <param name="message">The message.</param>
      void Info( string message );
      /// <summary>
      /// Logs an informational message.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="ex">The exception or <c>null</c>.</param>
      void Info( string message, Exception ex );
      /// <summary>
      /// Logs a warning message.
      /// </summary>
      /// <param name="message">The message.</param>
      void Warn( string message );
      /// <summary>
      /// Logs a warning message.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="ex">The exception or <c>null</c>.</param>
      void Warn( string message, Exception ex );
      /// <summary>
      /// Logs an error message.
      /// </summary>
      /// <param name="message">The message.</param>
      void Error( string message );
      /// <summary>
      /// Logs an error message.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="ex">The exception or <c>null</c></param>
      void Error( string message, Exception ex );
      /// <summary>
      /// Logs a fatal exception.
      /// </summary>
      /// <param name="message">The message.</param>
      void Fatal( string message );
      /// <summary>
      /// Logs a fatal exception.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="ex">The exception or <c>null</c></param>
      void Fatal( string message, Exception ex );
      /// <summary>
      /// Flushes this instance.
      /// </summary>
      void Flush();
   }
}
